﻿using Dora.Orm.Core.Domain.Entities;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace Dora.Services.AdminUser.Entities
{
    /// <summary>
    /// 权限表实体对象
    /// </summary>
    [SugarTable("permission")]
    public class PermissionEntity : Entity<int>
    {
        #region model


        /// <summary>
        /// 父级Id
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 系统Id
        /// </summary>
        public int SystemId { get; set; }

        /// <summary>
        /// 系统Key
        /// </summary>
        public string SystemKey { get; set; }

        /// <summary>
        /// 级别序号
        /// </summary>
        public int LevelIdx { get; set; }

        /// <summary>
        /// 层级路径;从最祖宗到本级,英文逗号分隔,保留最后一个逗号
        /// </summary>
        public string LevelPath { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 权限类型;1系统(在system_info表)2模块3菜单4按钮5数据
        /// </summary>
        public int PType { get; set; }

        /// <summary>
        /// 组织机构类型 0所有组织机构通用 1大社 2分社 3门店 4直属门店
        /// </summary>
        public int OrgType { get; set; }

        /// <summary>
        /// 权限Key
        /// </summary>
        public string AuthKey { get; set; }

        /// <summary>
        /// 是否有下级
        /// </summary>
        public short HasSub { get; set; }

        /// <summary>
        /// 权限值;值和Type有关，1无或Url 4无或Url 5对应的权限值
        /// </summary>
        public string AuthValue { get; set; }

        /// <summary>
        /// 排序;倒序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public short IsDeleted { get; set; }


        /// <summary>
        /// 创建人Id
        /// </summary>
        public Guid? CreatedUserId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreatedUserName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 更新人Id
        /// </summary>
        public Guid? UpdatedUserId { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string UpdatedUserName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdatedTime { get; set; }

        #endregion
        #region extend
        #endregion
    }
}
